<div class="main-wrap" style="background-color: #FFFFFF;">

	<div class="user-foot">
		<!--标题 -->
		<div class="am-cf am-padding">
			<div class="am-fl am-cf"><strong class="am-text-danger am-text-lg">我的足迹</strong> / <small>Browser&nbsp;History</small></div>
		</div>
		<hr/>
		<input style="display:none;" />
		<!--足迹列表 -->
		<div id="gooid"></div>
		<!--<div class="goods">
			<div class="goods-date" data-date="2015-12-21">
				<span><i class="month-lite">12</i>.<i class="day-lite">21</i><i class="date-desc">今天</i></span>
				<del class="am-icon-trash"></del>
				<s class="line"></s>
			</div>

			<div class="goods-box first-box">
				<div class="goods-pic">
					<div class="goods-pic-box">
						<a class="goods-pic-link" target="_blank" href="#" title="意大利费列罗进口食品巧克力零食24粒  进口巧克力食品">
							<img src="../images/TB1_pic.jpg_200x200.jpg" class="goods-img"></a>
					</div>
					<a class="goods-delete" href="javascript:void(0);"><i class="am-icon-trash"></i></a>
					<div class="goods-status goods-status-show"><span class="desc">宝贝已下架</span></div>
				</div>-->

		<!--			<div class="goods-attr">
					<div class="good-title">
						<a class="title" href="#" target="_blank">意大利费列罗进口食品巧克力零食24粒 进口巧克力食品</a>
					</div>
					<div class="goods-price">
						<span class="g_price">                                    
                                        <span>¥</span><strong>71</strong>
						</span>
						<span class="g_price g_price-original">                                    
                                        <span>¥</span><strong>142</strong>
						</span>
					</div>
					<div class="clear"></div>
					<div class="goods-num">
						<div class="match-recom">
							<a href="#" class="match-recom-item">找相似</a>
							<a href="#" class="match-recom-item">找搭配</a>
							<i><em></em><span></span></i>
						</div>
					</div>
				</div>
			</div>-->
	</div>
	<script type="text/javascript">
		$(document).ready(function() {
			$.get("/api/footprint/flist/" + 15 + "", function(data) {
				console.log(data.foots)
				$.each(data.foots, function(i, v) {
					console.log(v.goods_brief)
					var tt = "<div class='goods'><form>" +
						"<div class='goods-date' data-date='2015-12-21'>" +
						//			"<div id='id' name='id' value='"+v.id+"' style='display:none;'>"+v.id+"</div>"+
						/*"<span><i class='month-lite'>12</i>.<i class='day-lite'>21</i><i class='date-desc'>今天</i></span>"+
						"<del class='am-icon-trash'></del>"+*/
						"<s class='line'></s></div>" +
						"<div class='goods-box first-box'>";

					var head = "<div class='goods-pic'><div class='goods-pic-box'><a class='goods-pic-link' target='_blank' href='../../introduction/" + v.goods_id + "' title='" + v.goods_brief + "'><img src='" + v.list_pic_url + "' class='goods-img' /></a></div><a class='goods-delete'><div style='display:none;'>" + v.id + "</div><i class='am-icon-trash'></i></a><div class='goods-status goods-status-show'><span class='desc'>宝贝已下架</span></div></div>";
					var body = "<div class='goods-attr'>" +
						"<div class='good-title'>" +
						"<a class='title' href='../../introduction/" + v.goods_id + "' target='_blank'>" + v.goods_brief + "</a>" +
						"</div>" +
						"<div class='goods-price'>" +
						"<span class='g_price'>" +
						"<span>¥</span><strong>" + v.retail_price + "</strong>" +
						"</span>" +
						"<span class='g_price g_price-original'>" +
						"<span>¥</span><strong>" + v.market_price + "</strong>" +
						"</span>" +
						"</div>" +
						"<div class='clear'></div>" +
						"<div class='goods-num'>" +
						"<div class='match-recom'>" +
						"<a href='#' class='match-recom-item'>找相似</a>" +
						"<a href='#' class='match-recom-item'>找搭配</a>" +
						"<i><em></em><span></span></i></div></div></div></form></div>";
					$("#gooid").append(tt + head + body);
					//判断商品是否下架
					if(v.is_on_sale == true) {
						$(".goods-status-show").remove();
					}
					//删除足迹
					$(".goods-delete").unbind("click").click(function() {
						var formd = $(this).find("div").text();
						//console.log(formd)
						var d = $(this).closest(".goods");
						if(confirm("你确定要删除浏览历史吗？") == true)
							$.get("/api/footprint/del?fid=" + formd + "&userid=" + 15 + "", function(data) {
								if(data == "删除成功!") d.remove();
								alert(data);
							});
					});
				});
			});
		});
	</script>
</div>